
package cartagows.wsframework.wssecurity.core;

import java.util.Vector;

import org.apache.ws.security.SOAPConstants;
import org.apache.ws.security.message.WSSecHeader;
import org.w3c.dom.Document;

import cartagows.wsframework.wssecurity.policy.PolicyData;

public class MessageData {

	private PolicyData policyData = null;
	private WSSecHeader secHeader = null;
	private int timeToLive = 300;
	private int timestampMaxSkew = 0;
	private String timestampId;
	private Document document;  
	private boolean isInitiator;
	private String encryptionUser;
	private String signatureUser;
	private String signatureDecryptionPassword;
	private String utUsername;
	private String utPassword;
	private String cryptoEncProperties;
	private String cryptoDecProperties;
	private SOAPConstants soapConstants;
	private Vector results;

	public MessageData(PolicyData pd, Document doc, WSSecHeader secHeader, 
			SecurityInfo securityInfo, Vector results, boolean initiator) throws SecurityException {

		this.policyData = pd;
		this.document = doc;
		this.secHeader = secHeader;
		this.isInitiator = initiator;
		this.results = results;
		this.utUsername = securityInfo.getUtUsername();
		this.utPassword = securityInfo.getUtPassword();
		this.encryptionUser = securityInfo.getEncryptionUser();
		this.signatureUser = securityInfo.getSignatureUser();
		this.signatureDecryptionPassword = securityInfo.getSignatureDecryptionPassword();
		this.cryptoEncProperties = securityInfo.getCryptoEncProperties();
		this.cryptoDecProperties = securityInfo.getCryptoDecProperties();

	}

	public Document getDocument() {
		return document;
	}

	public int getTimeToLive() {
		return timeToLive;
	}

	public void setTimeToLive(int timeToLive) {
		this.timeToLive = timeToLive;
	}

	public int getTimestampMaxSkew() {
		return timestampMaxSkew;
	}

	public void setTimestampMaxSkew(int timestampMaxSkew) {
		this.timestampMaxSkew = timestampMaxSkew;
	}

	public PolicyData getPolicyData() {
		return policyData;
	}

	public WSSecHeader getSecHeader() {
		return secHeader;
	}

	public void setSecHeader(WSSecHeader secHeader) {
		this.secHeader = secHeader;
	}

	public String getTimestampId() {
		return timestampId;
	}

	public void setTimestampId(String timestampId) {
		this.timestampId = timestampId;
	}

	public boolean isInitiator() {
		return isInitiator;
	}

	public SOAPConstants getSoapConstants() {
		return soapConstants;
	}

	public String getEncryptionUser() {
		return encryptionUser;
	}

	public void setEncryptionUser(String encryptionUser) {
		this.encryptionUser = encryptionUser;
	}

	public String getSignatureUser() {
		return signatureUser;
	}

	public void setSignatureUser(String signatureUser) {
		this.signatureUser = signatureUser;
	}

	public String getSignatureDecryptionPassword() {
		return signatureDecryptionPassword;
	}

	public void setSignatureDecryptionPassword(String signatureDecryptionPassword) {
		this.signatureDecryptionPassword = signatureDecryptionPassword;
	}

	public String getUtUsername() {
		return utUsername;
	}

	public void setUtUsername(String utUsername) {
		this.utUsername = utUsername;
	}

	public String getUtPassword() {
		return utPassword;
	}

	public void setUtPassword(String utPassword) {
		this.utPassword = utPassword;
	}

	public String getCryptoEncProperties() {
		return cryptoEncProperties;
	}

	public void setCryptoEncProperties(String cryptoEncProperties) {
		this.cryptoEncProperties = cryptoEncProperties;
	}

	public String getCryptoDecProperties() {
		return cryptoDecProperties;
	}

	public void setCryptoDecProperties(String cryptoDecProperties) {
		this.cryptoDecProperties = cryptoDecProperties;
	}

	public Vector getResults() {
		return results;
	}

	public void setResults(Vector results) {
		this.results = results;
	}

}
